package com.arron.algorithm.huawei.中等;

import java.util.Scanner;

public class 矩阵乘法 {


    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别

        int x = in.nextInt();
        int y = in.nextInt();
        int z = in.nextInt();

        int[][] A = new int[x][y];
        int[][] B = new int[y][z];

        for (int i = 0; i < x; i++) {
            for (int j = 0; j < y; j++) {
                A[i][j] = in.nextInt();
            }
        }

        for (int i = 0; i < y; i++) {
            for (int j = 0; j < z; j++) {
                B[i][j] = in.nextInt();
            }
        }

        int[][] res = new int[x][z];

        for (int i = 0; i < x; i++) {

            for (int j = 0; j < z; j++) {
                int temp = 0;

                for (int k = 0; k < y; k++) {
                    temp = temp + A[i][k] * B[k][j];
                }
                res[i][j] = temp;
            }
        }


        for (int i = 0; i < x; i++) {

            for (int j = 0; j < z; j++) {
                System.out.print(res[i][j] + " ");
            }
            System.out.println();
        }

    }
}
